<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../../../css/mui.min.css">
    <link rel="stylesheet" href="../css/common.css">
    <!-- <link rel="stylesheet" href="css/body.css"> -->
    <link rel="stylesheet" href="../css/new.css">
    <link rel="stylesheet" type="text/css" href="../../../css/mui.picker.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/mui.poppicker.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/preview.css" />
    <title>注册</title>
    <style>
      .form-item{border-bottom:1px solid rgba(228, 228, 228, 1);margin:10px 0;
			display: flex;flex-wrap:wrap;}.p-form{padding:2vh 6.5%;}
			.form-item span{font-size: 14px;}
			.form-item span:nth-child(1){width:62px;text-align-last: justify;color:#666;}
			.form-item span:nth-child(2){width:calc(100% - 62px);}
			.form-item input{background:none;border:none;color:rgb(153, 153, 153);
			margin:0;border-radius: 0;}
			.form-item input,.form-item span,.form-item{height:40px;line-height: 40px;}
			.form-item input{font-size: 14px; font-weight: 400; color:#555;height:38px;line-height: 38px;}
			.mui-radio{display: flex;}.mui-radio input[type=radio]{transform: scale(.7);position: relative;right:0;margin-right: 15px;}
			.mui-icon-arrowright{position: relative;}
			.mui-icon-arrowright:before{ position: absolute;right:0;color: #bbb;font-size: 22px;}
			.p-sendcode{position: relative;}.p-qrts{width: 70%;padding:5px 0 0 30%;display: flex; visibility: hidden;
			justify-content: flex-start;}.p-qrts font{width:auto;padding:0 24px;height:20px;line-height: 20px;
			background:rgba(242, 242, 242, 1);text-align: center;}
			.p-qrts font:nth-child(2){}
			.mui-btn-primary{position: absolute;right:0;top:0;}
			.p-qrts font{color: #aaa;font-size: 12px;}.p-qrts font.on{background: orangered;color: #fff;}
			.p-qrts font:nth-child(2).on{background: #F19149;}.yzm-btn{
					transition: none;
					padding: 2px 0;border:1px solid #339AF2;
					height: 24px;width:auto;color: #339AF2;
					border-radius: 15px;text-align: center;
					top: 8px;line-height: 19px;right:0;
					font-size: 12px; position: absolute;
			}
			.p-qrts font:nth-child(1){border-radius: 20px 0 0 20px;}
			.p-qrts font:nth-child(2){}
			.p-qrts font:nth-child(3){border-radius: 0 20px 20px 0;}
			.p-qrts font:nth-child(1).on{}
			.p-qrts font:nth-child(2).on{}
			.p-qrts font:nth-child(3).on{background: #0CBD5F;}
      .p-btn {
          width: 100%;
          text-align: center;
          background: #275EB1;
          color: #fff;
          font-size: 18px;
          line-height: 40px;
          height: 40px;
          margin: 20px 0;
          border-radius: 2px;
      }
	  ::placeholder {
	    color: #ccc;
	  }
		</style>
  </head>
  <body>
    <header class="mui-bar mui-bar-nav">
      <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
      <h1 class="mui-title">关联项目</h1>
    </header>
    <div class="mui-content" id="page" v-cloak>
      <div class="p-form">
        <div class="form-item">
          <span>姓名</span><span><input v-model="user.compellation" type="text" placeholder="" disabled="disabled"></span>
        </div>
        <div class="form-item">
          <span>身份证号</span><span><input v-model="user.idCard" type="text" placeholder="请输入身份证号" disabled="disabled"></span>
        </div>
        <div class="form-item">
          <span>手机号</span><span><input v-model="user.phone" type="text" placeholder="请输入身份证号" disabled="disabled"></span>
        </div>
        <div class="form-item" v-if="isUnit=='0'">
          <span>所在区域</span><span class="mui-icon mui-icon-arrowright">
            <input v-model="form.areaName" type="text" @click.stop="getArea" readonly placeholder="请选择所属区域" />
        </div>
        <div class="form-item" v-if="isUnit=='0'">
          <span>所属场站</span><span class="mui-icon mui-icon-arrowright">
            <input v-model="form.stationName" type="text" @click.stop="getStation" readonly placeholder="请选择所属场站" />
        </div>
        <div class="form-item" v-if="isUnit=='1'">
          <!-- <div class="form-item"> -->
          <span>所属单位</span><span class="mui-icon mui-icon-arrowright">
            <input v-model="form.enterpriseName" type="text" @click.stop="getEnterprise" readonly placeholder="选择所属公司名称"></span>
        </div>
        <div class="form-item">
          <span>作业项目</span><span class="mui-icon mui-icon-arrowright">
            <input v-model="form.currentProjectName" type="text" @click.stop="getProject" readonly placeholder="选择或填写项目名称"></span>
        </div>
        <div class="uploadBox">
          <div class="p-mw">身份证照片<font color="red">*</font>
          </div>
          <div class="p-mw tishi">请上传清晰的本人身份证正反面照片</div>
          <div class="p-mw tishi">示例：</div>
          <div class="p-mw">
            <img width="20%" src="./../img/sfz_a.png">
            <img width="20%" src="./../img/sfz_b.png">
          </div>
          <div class="p-mw upload-comp">
            <div class="p-posr hasimg" v-for="(item,index) in form.idCardP">
              <img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
              <img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
              <a href="javascript:;" @click="deletePhone($event,index,'idCardP')"> </a>
            </div>

            <div class="p-posr comp-1" data-front="1" @click.stop="choosePhoto($event,'idCardP')" v-if="checkFiles(form.idCardP,1)">
              <span data-front="1">身份证正面</span>
            </div>
            <div class="p-posr comp-1" data-front="2" @click.stop="choosePhoto($event,'idCardP')" v-if="checkFiles(form.idCardP,2)">
              <span data-front="2">身份证背面</span>
            </div>
          </div>
        </div><!-- end uploadBox -->
        <div class="uploadBox">
          <div class="p-mw">体检报告<font color="red">*</font>
          </div>
          <div class="p-mw tishi">请上传近3个月清晰的本人体检报告</div>
          <div class="p-mw upload-comp">
            <div class="p-posr hasimg" v-for="(item,index) in form.examination">
              <img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
              <img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
              <a href="javascript:;" @click="deletePhone($event,index,'examination')"> </a>
            </div>
            <div class="p-posr" @click="choosePhoto($event,'examination')"></div>
          </div>
        </div><!-- end uploadBox -->
        <div class="uploadBox">
          <div class="p-mw">工作票负责人授权书<font color="red">*</font>
          </div>
          <div class="p-mw tishi">如承担工作票负责人，请上传授权书</div>
          <!-- <div class="upload-radio">
        		<span>是</span><input v-model="hasAuthorization" name="radio1" value="1" type="radio">
        		<span>否</span><input v-model="hasAuthorization" name="radio1" value="0" type="radio">
        	</div> -->
          <div class="form-item">
            <span style="width: 0px;"></span><span class="mui-input-row mui-radio" style="padding-left:0%">
              <font color="#777">是</font><input v-model="hasAuthorization" type="radio" name="radio1" value="1">
              <font color="#777">否</font> <input v-model="hasAuthorization" name="radio1" type="radio" value="2">
            </span>
          </div>
          <div class="p-mw upload-comp" v-if="hasAuthorization == '1'">
            <div class="p-posr hasimg" v-for="(item,index) in form.authorization">
              <img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
              <img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
              <a href="javascript:;" @click="deletePhone($event,index,'authorization')"> </a>
            </div>
            <div class="p-posr" @click="choosePhoto($event,'authorization')"></div>
          </div>
        </div><!-- end uploadBox -->
        <div class="uploadBox">
          <div class="p-mw">作业工种<font color="red">*</font>
          </div>
          <div class="p-mw upload-job">
            <span v-for="item in jobsClass" @click="selectJob(item.id)" :class="{selected: isTags(item.id)}" :data-value="item.value">{{item.label}}</span>
            <div style="clear: both;"></div>
          </div>
        </div><!-- end uploadBox -->
		<div class="uploadBox">
			<div class="p-mw">检验报告：<font color="red"></font></div>
			<div class="p-mw tishi">工器具、劳动防护用品合格证、检验合格报告等</div>
			<div class="p-mw upload-comp">
				<div class="p-posr hasimg" v-for="(item,index) in form.special">
					<img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
					<img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
					<a href="javascript:;" @click="deletePhone($event,index,'special')"> </a>
				</div>
				<div class="p-posr" @click="choosePhoto($event,'special')"></div>
			</div>
		</div>
        <div class="uploadBox">
          <div class="p-mw">个人特种作业证件：<font color="red"></font>
          </div>
          <div class="p-mw tishi"></div>
          <div class="p-mw upload-comp">
            <div class="p-posr hasimg" v-for="(item,index) in form.certificate">
              <img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
              <img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
              <a href="javascript:;" @click="deletePhone($event,index,'certificate')"> </a>
            </div>
            <div class="p-posr" @click="choosePhoto($event,'certificate')"></div>
          </div>
        </div>
        <div class="uploadBox" style="border: 0;">
          <div class="p-mw">本人驾驶证：<font color="red"></font>
          </div>
          <div class="p-mw tishi">请上传符合本人作业车辆的驾照照片 ，5年以上驾龄</div>
          <div class="p-mw upload-comp">
            <div class="p-posr hasimg" v-for="(item,index) in form.drivinglicense">
              <img class="upload_loading" src="../sign/loading.gif" style="width: 50%;height:50%;margin:25%;opacity:0;">
              <img style="visibility: hidden;" @load="uploadessload($event)" :src="filePath+item.id+'?token='+token" data-preview-src="" data-preview-group="1">
              <a href="javascript:;" @click="deletePhone($event,index,'drivinglicense')"> </a>
            </div>
            <div class="p-posr" @click="choosePhoto($event,'drivinglicense')"></div>
          </div>
        </div><!-- end uploadBox -->
        <div class="p-btn" @click="next">关联</div>
      </div>

    </div>
  </body>
  <script src="../../../js/mui.min.js"></script>
  <script src="../../../js/mui.picker.js" type="text/javascript" charset="utf-8"></script>
  <script src="../../../js/mui.poppicker.js" type="text/javascript" charset="utf-8"></script>
  <script src="../../../js/jquery-3.2.1.min.js"></script>
  <script src="../../../js/mkeyplus.base.js"></script>
  <script src="../../../js/common.js"></script>
  <script src="../js/mkeyplus.base.js"></script>
  <script type="text/javascript" src="../../../js/vue.js"></script>
  <script src="../../../js/uuid.js"></script>
  <script src="../formal/js/api.js"></script>
  <script src="../formal/js/up.js?5"></script>
  <script src="../../../js/mui.zoom.js"></script>
  <script src="../../../js/mui.previewimage.js"></script>
  <script>
    mui.init();
    var htapi = new HTGlobal();
    //避免重复绑定
    var projectAdd = null;
    var selectEnterprise = function(data) {
      return htapi.eventSelectEnterprise.call(htapi, data);
    }
    window.removeEventListener('eventSelectEnterprise', selectEnterprise);
    window.addEventListener('eventSelectEnterprise', selectEnterprise);
    var cv = null,
      isUnit = null;
      mui.previewImage();//图片预览
    // mui('#topPopover').popover('show')
    mui.plusReady(function() {
      cv = plus.webview.currentWebview();
      isUnit = cv.isUnit;
      projectAdd.isUnit = isUnit; //是否由单位1是0否
      projectAdd.form.hasUnit = isUnit; //是否由单位1是0否
      console.log(projectAdd.form.hasUnit)
      projectAdd.getJobs();
	  
	  //获取默认资料
	  projectAdd.getLastInfo()
    })
    projectAdd = new Vue({
      el: '#page',
      data: {
        user: JSON.parse(localStorage.getItem('outUser')), //当前用户信息
        isUnit: '', //是否由单位1是2否
        hasAuthorization: 1,
        postData: {},
        form: {
          appUserId:'',//当前用户id
          compellation:'',//姓名
          idCard:'',//身份证号
          phone:'',//手机号
          hasUnit: '',
          areaId: '',
          areaName: '',
          stationId: '',
          stationName: '',
          enterpriseId: '', //单位ID
          enterpriseName: '', //单位名称
          currentProjectId: '', //项目ID
          currentProjectName: '', //项目名称
          enterpriseProjectId:'',//关联项目ID
          sex: 1,
          code: '',
          idCardP: [], //身份证图片列表
          examination: [], //体检报告
          authorization: [], //授权书
          special: [], //特种证件
          certificate: [], //个人特种作业证
          tbJobClasses: [], //工作类型
          drivinglicense: [], //驾驶证
		  isLeader:1
        },
        jobsClass: [], //作业类别
        hasAppUser: true,
		filePath:'',
		token:'',
		postStatus:false
      },
      onLoad() {},
	  created(){
		  this.filePath = htapi.filePath;
		  this.token = localStorage.getItem('token');
	  },
      methods: {
		getLastInfo(){
			/** 获取用户上一次上传的资料
			 * @method getLastInfo
			 * @param {空}
			 * @return {空}
			*/
		   var user = localStorage.getItem('outUser');
		   var that = this;
		   if(user){
			    user = JSON.parse(user)
				htapi.apiUrl[htapi.apiKey].temporary = htapi.apiUrl[htapi.apiKey].getLastInfo+user.id;
				htapi.fetch({},function(data){
					console.log(JSON.stringify(data))
					if(data.code=='0' && data.data){
						var info = data.data
					  that.form.appUserId=info.appUserId;//当前用户id
					  that.form.compellation=user.compellation;//姓名
					  that.form.idCard=user.idCard;//身份证号
					  that.form.phone=user.phone;//手机号
					  that.form.hasUnit= info.hasUnit;
					  that.form.areaId= info.areaId;
					  that.form.areaName= info.areaName;
					  that.form.stationId= info.stationId;
					  that.form.stationName= info.stationName;
					  that.form.enterpriseId= info.enterpriseId; //单位ID
					  that.form.enterpriseName= info.enterpriseName; //单位名称
					  //that.form.currentProjectId= info.currentProjectId; //项目ID
					  //that.form.currentProjectName= info.currentProjectName; //项目名称
					  that.form.enterpriseProjectId=info.enterpriseProjectId;//关联项目ID
					  that.form.idCardP=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 3});
					  that.form.examination=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 4});
					  that.form.authorization=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 1});
					  that.form.certificate=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 2});
					  that.form.drivinglicense=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 6});
					  that.form.special=info.tbAppUserFileDTOS.filter(function(value){	return value.type == 5});
					  if(that.form.authorization.length==1){//判断是否有工作票负责人授权书
						that.hasAuthorization=1
					  }else{
						that.hasAuthorization=2
					  }
					  // that.form.tbJobClasses=data.tbAppUserFileDTOS.filter(function(value){	return value.type == 1});
					  info.tbJobClasses.forEach(function(item){//作业工种
						that.form.tbJobClasses.push(item.id)
					  })
					   that.form.idCardP.forEach(function(item,index){//根据顺序判断正反面身份证
						item.front= index + 1
					  })
					  that.$forceUpdate()					
					}
					
				},false,'temporary')
				delete htapi.apiUrl[htapi.apiKey].temporary
			}
		},
        getEnterprise() {
          mui.openWindow({
            url: './unit.html',
            id: './unit.html',
          });
        },
		setProject(data){
			var D = data.detail || {},Form = this.form
			Form.currentProjectName = D.currentProjectName;
			Form.currentProject = D.currentProjectId;
			Form.currentProjectId = D.currentProjectId;
			Form.enterpriseProjectId = D.enterpriseProjectId;
			console.log(JSON.stringify(data.detail))
		},
        getProject() {
		  var that = this
		  if(that.isUnit!=1){
			that.form.hasUnit = '0'
		  }else{
			that.form.hasUnit = '1' 
		  }
		  htapi.getProjectForPage(this.form,'../formal/changeProject',function(){
		  	window.removeEventListener('changeProject',that.setProject);
		  	window.addEventListener('changeProject',that.setProject);
		  })
		  return;
		  //旧方法
          htapi.getProjectList(this.form, function(data) {
            var btnArray = ['取消', '确认'];
            mui.confirm('所属区域：' + data.areaName + ";\n" + '所属场站：' + data.stationName + ';', '请核对您所选的信息',
              btnArray,
              function(e) {
                if (e.index == 1) {

                }
              })
          })
        },
        getArea() {
          /** 调用区域列表
           * @method getArea
           * @for HTGlobal
           * @param{form} form当前表单内容
           * @return {空} 
           */
		  var form = this.form
          htapi.getArea(form,function(){
			form.stationId = ''
			form.stationName = ''
			form.currentProjectName = ''
			form.currentProjectId = ''
		  })
        },
        getStation() {
          /** 调用场站列表
           * @method getStation
           * @for HTGlobal
           * @param{form} form当前表单内容
           * @return {空} 
           */
		  var form = this.form
          htapi.getStation(form,function(){
			form.currentProjectName = ''
			form.currentProjectId = ''
		  })
        },
        checkFiles(list, type) {
          return !list.some(function(item) {
            return item.front == type
          });
        },
        uploadessload(e) {
          var pe = $(e.target).parents('.hasimg');
          pe.find('.upload_loading').remove();
          pe.find('img').css('visibility', 'inherit');
        },
        choosePhoto(e, listkey) {
          var _this = this;
          var _front = e.target.getAttribute('data-front') || false;
          page.setConf({
            server: mui.baseWApp.serverUrl + htapi.apiUrl.ext.upload,
            //server:'http://localhost/upload.php',
            postkey: 'fileData',
            callback: function(res) {
              if (res.data) {
                var data = res.data;
                data.fileDirectory = res.path;
                //data.fileDirectory = htapi.filePath + data.id;
                if (_front) data.front = _front;
                //添加到数组
                _this.form[listkey].push(data);
              }
            }
          });
          page.imgUp();
        },
        deletePhone(e, i, listkey) {
          this.form[listkey].splice(i, 1);
        },
        getJobs() {
          console.log(mui.baseWApp.serverUrl, 1111)
          //获取工种
          var _this = this;
          htapi.getDictList({
            dictName: 'Job_type'
          }, function(data) {
            if (data.code == '0') {
              console.log('工种' + JSON.stringify(data))
              if (data.data) {
                _this.jobsClass = data.data;
                //console.log(_this.jobsClass);
              }
            }
          });

        },
        selectJob(id) { //选择作业工种
         for (let i = 0; i < this.form.tbJobClasses.length; i++) {
            if (this.form.tbJobClasses[i] == id) {
              this.form.tbJobClasses.splice(i, 1);
              return false;
            }
          }
          this.form.tbJobClasses.push(id); 
        },
        // 标签选择样式控制
        isTags(id) {
          if (this.form.tbJobClasses.includes(id)) {
            return true;
          } else {
            return false;
          }
        },
        verificationForm() {
          //验证提交
          var _this = this;

          var formData = this.form,
            bAppUserFileDTOS = [],
            tbJobClasses = [];

          formData.tbJobClasses.map(function(item) {
            var a = _this.jobsClass.filter(function(itemc) {
              return itemc.id == item;
            });
            if (a[0])
              tbJobClasses.push(a[0]);
          });
          _this.postData.tbJobClasses = tbJobClasses;
          // console.log(JSON.stringify(tbJobClasses));return;
          if (formData.idCardP.length < 2) {
            mui.toast('请上传身份证正反面照片！');
            return false;
          }
          if (formData.examination.length < 1) {
            mui.toast('请上传体检报告！');
            return false;
          }
          if (formData.tbJobClasses.length < 1) {
            mui.toast('至少选择一个作业类别！');
            return false;
          }
          if (formData.special.length < 1) {
            //mui.toast('请上传作业证！');return false;
          }
          if (formData.drivinglicense.length < 1) {
            //mui.toast('请上传驾驶证！');return false;
          }
          if (_this.hasAuthorization == '1' && formData.authorization.length < 1) {
            mui.toast('请上传负责人授权书！');
            return false;
          }
          if (_this.hasAuthorization != '2') {
            this.cleFi(bAppUserFileDTOS, formData.authorization, 1);
          }
          this.cleFi(bAppUserFileDTOS, formData.idCardP, 3);

          this.cleFi(bAppUserFileDTOS, formData.examination, 4);

          this.cleFi(bAppUserFileDTOS, formData.special, 5);

          this.cleFi(bAppUserFileDTOS, formData.drivinglicense, 6);

          this.cleFi(bAppUserFileDTOS, formData.certificate, 2);

          this.postData.tbAppUserFileDTOS = bAppUserFileDTOS;
          
          return true;
        },
        cleFi(arr1, arr2, type) {
          //清洗数据
          arr2.map(function(item) {
            item['type'] = type;
            //delete item['fileDirectory'];
            delete item['fileSize'];
            arr1.push(item);
            return item;
          });
          return arr1;
        },
        next() {//提交数据
          if(this.postStatus)
		  return;

          var form = this.form;
          
          if (form.enterpriseId == '' && form.hasUnit == 1) {
            mui.toast('请选择所属单位');
            return false;
          }
          if (form.currentProjectId == '') {
            mui.toast('请选择所属项目');
            return false;
          }
          var rs = this.verificationForm();
          var formData={
            appUserId:this.user.id,//当前用户id
            compellation:this.user.compellation,//姓名
            idCard:this.user.idCard,//身份证号
            phone:this.user.phone,//手机号
            hasUnit: form.hasUnit,
            areaId: form.areaId,
            areaName: form.areaName,
            stationId: form.stationId,
            stationName: form.stationName,
            enterpriseId: form.enterpriseId, //单位ID
            enterpriseName: form.enterpriseName, //单位名称
            currentProjectId: form.currentProjectId, //项目ID
            currentProjectName: form.currentProjectName, //项目名称
            enterpriseProjectId: form.enterpriseProjectId, //关联项目ID
			isLeader: this.hasAuthorization==1?1:0,
            ...this.postData
          }
           console.log(JSON.stringify(this.formData))
          if (rs) {
			projectAdd.postStatus = true
            plus.nativeUI.showWaiting('关联中')
            htapi.fetch(formData,function(data){
				projectAdd.postStatus = false
              console.log('关联成功'+JSON.stringify(data));
              if(data.code=='0'){  
                var page=plus.webview.currentWebview().opener()
                mui.fire(page, 'projectRefresh');
                plus.webview.currentWebview().close();
				
				
				
              }else{
				  mui.toast(data.msg)
			  }
             plus.nativeUI.closeWaiting() 
            },false,'saveProject','post')
          }

        }
      }
    })
    window.addEventListener('projectUnit', function(event) {
      console.log(JSON.stringify(event.detail))
      projectAdd.form.enterpriseName = event.detail.enterpriseName
      projectAdd.form.enterpriseId = event.detail.enterpriseId
	  projectAdd.form.currentProjectId = ''
	  projectAdd.form.currentProjectName = ''
    });
  </script>
</html>
